Motion vector coding and decoding methods

ABSTRACT

A motion vector coding apparatus includes a motion vector coding unit that codes a motion vector inputted from a motion vector detecting unit. A motion vector for each current block is coded based on a difference between the motion vector and a predicted vector obtained from motion vectors for previously coded neighboring blocks. The predicted vector is generated by one of: the motion vectors referring to the same picture are selected from among the motion vectors for the neighboring blocks; the motion vectors for neighboring blocks are ordered in the predetermined order and the motion vectors of the same order rank are selected; and the predicted vector for a second motion vector of the current block is the first motion vector, and when the second motion vector and the first motion vector refer to different pictures, the first motion vector is scaled based on temporal distance between the pictures.

FIELD OF THE INVENTION

The present invention relates to methods for coding and decoding motionvector information in coding and decoding moving pictures using interpicture prediction coding.

BACKGROUND OF THE INVENTION

Generally in moving picture coding, information is compressed bysuppressing the spatial and temporal redundancies that exist withinmoving pictures. As a method of suppressing the temporal redundancies,inter picture prediction coding is used. In the inter picture predictioncoding, for coding a current picture, pictures temporally preceding orfollowing the current picture are used as reference pictures. The motionof the current picture from the reference pictures is detected, and thedifference between the picture obtained by motion compensation and thecurrent picture is calculated. Then, the spatial redundancies areeliminated from this difference, so as to compress the informationamount of the moving pictures.

In the conventional moving picture coding method according to the MPEG-4standard (ISO/IEC 14496-2: 1999 Information technology, Coding ofaudio-visual objects—Part 2: Visual, pp. 146-148) (hereinafter referredto as MPEG-4) and the like, there are three types of pictures.I-pictures (Intra Coded Pictures) are coded not using inter pictureprediction, but intra coded. P-pictures (Predictive Coded Pictures) arecoded using inter picture prediction with reference to one precedingpicture. B-pictures (Bi-directional Predictive Coded Pictures) are codedusing inter picture prediction with reference to one preceding picture(I-picture or P-picture) and one following picture (I-picture orP-picture). FIG. 15 illustrates predictive relations between respectivepictures in the above-mentioned moving picture coding method. In FIG.15, vertical lines show pictures, and picture types (I, P and B) areindicated at the lower right of the respective pictures. The pictures atthe heads of the arrows are coded using inter picture prediction withreference to the pictures at the other ends of the arrows. For example,the second B-picture is coded using the first I-picture and the fourthP-picture as reference pictures.

According to the MPEG-4 standard, for coding motion vectors, adifference between a motion vector of a current block and a predictedvector obtained from the motion vectors for the neighboring blocks iscoded. Since the motion vectors of the neighboring blocks usually havesimilar motion size and direction on the spatial coordinate to themotion vectors for the current block, the coding amount of the motionvectors can be reduced by calculating the difference from the predictedvector obtained from the motion vectors of the neighboring blocks. Howto code motion vectors according to MPEG-4 will be explained withreference to FIGS. 16A˜16D. In these figures, blocks indicated inboldface are macroblocks of 16×16 pixels, and there exist 4 blocks of8×8 pixels in each macroblock. In FIG. 16A˜16D, the motion vector (MV)of each block is coded based on the difference from the predicted vectorobtained from the motion vectors (MV1, MV2 and MV3) of the threeneighboring blocks. As this predicted vector, medians calculatedrespectively from the horizontal and vertical components of these threemotion vectors MV1, MV2 and MV3 are used. However, a neighboring blockhas sometimes no motion vector, for example when it is intra coded or itis coded as a B-picture in direct mode. If one of the neighboring blocksis a block of this type, the motion vector for the block is consideredequal to 0. If two of the neighboring blocks are blocks of this type,the motion vector of the remaining one block is used as a predictedvector. And when all of the neighboring blocks have no motion vector,the motion vector of the current block is coded on the assumption thatthe predicted vector is 0.

Meanwhile, H.26L method, which has been developed for standardization,proposes a new coding method of B-pictures. B-pictures are traditionallycoded using one previously coded preceding picture and one previouslycoded following picture as reference pictures, but in the new codingmethod, B-pictures are coded using two previously coded precedingpictures, two previously coded following pictures, or one previouslycoded preceding picture and one previously coded following picture.

In the conventional motion vector coding method, even if the neighboringblocks in a B-picture respectively have two motion vectors toward thepreceding reference pictures or two motion vectors toward the followingreference pictures, there is no definite and unified method ofdetermining which one of these two vectors should be used as a predictedvector, and thus there is no efficient coding method of the determinedmotion vector.

The present invention is directed to solving the above-mentionedproblem. It is an object of the present invention to provide motionvector coding and decoding methods capable of unifying the method ofdetermining a predicted vector for coding a motion vector, and improvingpredictability.

SUMMARY OF THE INVENTION

In order to achieve above-mentioned object, the motion vector codingmethod of the present invention is a motion vector coding method forgenerating a motion vector for a current block to be coded and apredicted vector for the motion vector, and coding a difference betweenthe motion vector and the predicted vector. The motion vector codingmethod includes an assigning step that, when at least one block among aplurality of coded blocks in the neighborhood of the current block hastwo motion vectors which refer to reference pictures in the samedirection in a display order, assigns IDs to two motion vectors forrespective one of the plurality of coded blocks. A generating step forgenerates the predicted vector for each of the motion vectors for thecurrent block based on the motion vectors with the same ID among themotion vectors for the plurality of coded blocks.

Here, in the assigning step, the IDs may further be assigned to themotion vectors for the current block. In the generating step, thepredicted vector for each of the motion vectors for the current blockmay be generated based on the motion vectors with the same ID as the IDassigned to the motion vector for the current block among the motionvectors for the plurality of coded blocks.

Also, in the assigning step, the IDs may be assigned to the two motionvectors for respective one of the plurality of coded blocks based on anorder in a bit stream where each of the motion vectors is placed as thecoded difference.

In the assigning step, the IDs may be assigned to the two motion vectorsfor a respective plurality of coded blocks. The IDS may be assigned indescending and ascending order of temporal distances in the displayorder from a picture including the current block to the referencepictures referred to by the two motion vectors.

In the generating step, motion vectors, which refer to the samereference picture as the motion vector for the current block, areselected from among the motion vectors with the same ID; and thepredicted vector may be generated based on the selected motion vectors.

In the generating step, a median of the selected motion vectors may begenerated as the predicted vector.

The moving picture coding method, motion vector decoding method, movingpicture decoding method, motion vector coding apparatus, motion vectordecoding apparatus and programs for them according to the presentinvention are structured similarly to the above-mentioned motion vectorcoding method.

In the motion vector coding method of the present invention, a motionvector of each current block is coded using a difference between apredicted vector obtained from motion vectors of previously codedneighboring blocks and the motion vector of the current block. Thispredicted vector can be generated by one of the following processes.When the current block and the neighboring blocks respectively have aplurality of motion vectors pointing the reference pictures in the samedirection (forward or backward): (A) the motion vectors which refer tothe same picture are selected from among the motion vectors for theneighboring blocks so as to generate the predicted vector (based on theselected motion vectors); (B) the motion vectors for the respectiveneighboring blocks are ordered in the predetermined order, and themotion vectors of the same order rank are selected from the orderedmotion vectors so as to generate the predicted vector (based on theselected motion vectors); and (C) the predicted vector for “the secondmotion vector” of the current block shall be “the first motion vector”,and if “the second motion vector” and “the first motion vector” refer todifferent pictures, “the first motion vector” is scaled according to thetemporal distance between the pictures so as to generate the predictedvector.

Accordingly, even when a block has a plurality of motion vectorspointing in the same direction (forward or backward), the method forcoding the motion vectors can be unified, and the coding efficiency ofthe motion vectors can be improved.

On the other hand, in the motion vector decoding method of the presentinvention, a motion vector of each current block is decoded by adding apredicted vector obtained from the motion vectors of the decodedneighboring blocks and the motion vector of the current block. Thispredicted vector is generated by one of the following processes when thecurrent block and the neighboring blocks respectively have a pluralityof motion vectors pointing the reference pictures in the same direction(forward or backward); (A) the motion vectors which refer to the samepicture are selected from among the motion vectors for the neighboringblocks so as to generate the predicted vector (based on the selectedmotion vectors); (B) the motion vectors for the respective neighboringblocks are ordered in the predetermined order, and the motion vectors ofthe same order rank are selected from the ordered motion vectors so asto generate the predicted vector (based on the selected motion vectors);and (C) the predicted vector for “the second motion vector” of thecurrent block shall be “the first motion vector”, and if “the secondmotion vector” and “the first motion vector” refer to differentpictures, “the first motion vector” is scaled according to the temporaldistance between the pictures so as to generate the predicted vector.

Accordingly, the motion vector which is coded by the motion vectorcoding method of the present invention can be correctly decoded.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating the structure of a picture codingapparatus according to a first embodiment of the present invention.

FIG. 2A is a diagram illustrating the order of pictures inputted to aframe memory.

FIG. 2B is a diagram illustrating the order of coding the pictures.

FIG. 3A is a diagram illustrating a current block to be coded (at theupper left in a macroblock) and the previously coded neighboring blocks.

FIG. 3B is a diagram illustrating a current block to be coded (at theupper right in a macroblock) and the previously coded neighboringblocks.

FIG. 3C is a diagram illustrating a current block to be coded (at thelower left in a macroblock) and the previously coded neighboring blocks.

FIG. 3D is a diagram illustrating a current block to be coded (at thelower right in a macroblock) and the previously coded neighboringblocks.

FIG. 4A is a diagram illustrating reference pictures which motionvectors of a current block to be coded and previously coded neighboringblocks refer to respectively.

FIG. 4B is a diagram illustrating reference pictures which motionvectors of a current block to be coded and previously coded neighboringblocks refer to respectively.

FIG. 4C is a diagram illustrating reference pictures which motionvectors of a current block to be coded and previously coded neighboringblocks refer to respectively.

FIG. 5 is a diagram illustrating motion compensation in the case wheretwo reference pictures are both located in a forward direction.

FIG. 6 is a diagram illustrating the case where motion vectors arescaled.

FIG. 7 is a flowchart illustrating a predicted vector generating methodin the case where the first and second predicted vector generatingmethods are used in combination.

FIG. 8 is a diagram illustrating the order of motion vectors placed in abit stream.

FIG. 9 is a block diagram illustrating the structure of a picturedecoding apparatus according to a second embodiment of the presentinvention.

FIG. 10A is a diagram illustrating a physical format of a flexible disk.

FIG. 10B is a diagram illustrating a flexible disk, the cross-sectionalview of the appearance of the flexible disk, and the front view of theappearance of the flexible disk.

FIG. 10C is a diagram illustrating the appearance of an apparatus forwriting and reading out a program on and from the flexible disk.

FIG. 11 is a block diagram illustrating the overall configuration of acontent providing system.

FIG. 12 is a diagram illustrating a mobile phone using a moving picturecoding method and a moving picture decoding method.

FIG. 13 is a block diagram illustrating the structure of the mobilephone.

FIG. 14 is a diagram illustrating a digital broadcast system.

FIG. 15 is a diagram illustrating picture reference relations in theconventional art.

FIGS. 16A, 16B, 16C and 16D are diagrams illustrating neighboring blocksused for generating a predicted vector.

DETAILED DESCRIPTION OF THE INVENTION

The first embodiment of the present invention will be explained belowwith reference to the FIGS. 1-8. FIG. 1 is a block diagram of thepicture coding apparatus for coding motion vectors as a part of picturecoding, including a frame memory 101, a difference calculating unit 102,a residual error coding unit 103, a bit stream generating unit 104, aresidual error decoding unit 105, an addition unit 106, a frame memory107, a motion vector detecting unit 108, a mode selecting unit 109, acoding control unit 110, switches 111˜115, a motion vector storage unit116 and a motion vector coding unit 117.

Pictures are inputted to the frame memory 101 on picture-by-picturebasis in display order. FIG. 2A illustrates the order of inputtingpictures into the frame memory 101. In FIG. 2A, vertical lines showpictures, and an alphabet and a number at the lower right of eachpicture respectively indicate a picture type (P indicates a P-pictureand B indicates a B-picture) and a picture number in display order. Thepictures inputted to the frame memory 101 are reordered into codingorder. The pictures are reordered in coding order based on the referencerelations in inter picture prediction coding. That is, the pictures arereordered so that the pictures used as reference pictures are codedearlier than the pictures which refer to those reference pictures. Forexample, the reference relations of the pictures B8 and B9 areillustrated by arrows in FIG. 2A. In this figure, the arrowheadsindicate the pictures which refer to reference pictures, and the otherends of the arrows indicate the reference pictures. In this case, thepictures shown in FIG. 2A are reordered into those as illustrated inFIG. 2B.

The pictures reordered in the frame memory 101 are read out by everymacroblock. In this case, a macroblock shall be horizontal 16×vertical16 pixels in size, and motion compensation shall be performed by everyblock (8×8 pixels in size). Coding of the picture B8 will be explainedstep by step.

The picture B8 is a B-picture and coded by every macroblock or blockusing a maximum of two reference pictures among five coded pictures,preceding coded pictures P1, P4 and P7 and following coded pictures P10and P13. These reference pictures have already been coded, and the localdecoded pictures are stored in the frame memory 107.

For coding a B-picture, the coding control unit 110 turns the switch 113ON. If a B-picture is used as a reference picture for other pictures,the coding control unit 110 controls the switches 114 and 115 to be ON.If the B-picture is not used as a reference picture for other pictures,it controls the switches 114 and 115 to be OFF. Therefore, themacroblocks of the picture B8 read out from the frame memory 101 arefirst inputted to the motion vector detecting unit 108, the modeselecting unit 109 and the difference calculating unit 102.

The motion vector detecting unit 108 detects forward motion vectors andbackward motion vectors of each block included in a macroblock using thedecoded picture data of the pictures P1, P4 and P7 as forward referencepictures and the decoded picture data of the pictures P10 and P13 asbackward reference pictures, which are respectively stored in the framememory 107

The mode selecting unit 109 determines the coding mode of macroblocksusing the motion vectors detected by the motion vector detecting unit108. Here, the coding mode of macroblocks in a B-picture can be selectedfrom among intra picture coding, inter picture prediction coding usingone forward reference picture, inter picture prediction coding using twoforward reference pictures, inter picture prediction coding using onebackward reference picture, inter picture prediction coding using twobackward reference pictures, and inter picture prediction coding usingbi-directional motion vectors, for example. When inter pictureprediction coding using two forward reference pictures, inter pictureprediction coding using two backward reference pictures or inter pictureprediction coding using bi-directional motion vectors (one forwardreference and one backward reference) is selected, the block obtained byaveraging two reference blocks is used as a motion compensation block.One example of this case will be explained with reference to FIG. 5. Inthis figure, for motion compensation of a block X in the picture B8using a block Y in the picture P7 and a block Z in the picture P4 asforward reference pictures, the average block of the blocks Y and Z isused as a motion compensation block for the block X.

The coding mode determined by the mode selecting unit 109 is outputtedto the bit stream generating unit 104. The reference blocks based on thecoding mode determined by the mode selecting unit 109 are outputted tothe difference calculating unit 102 and the addition unit 106. If theintra picture coding is selected, the reference blocks are notoutputted. If the mode selecting unit 109 selects intra picture coding,the switch 111 and the switch 112 are controlled to be connectedrespectively to “a” and “c”, and if it selects inter picture predictioncoding, the switch 111 and the switch 112 are controlled to be connectedrespectively to “b” and “d”. The case where the mode selecting unit 109selects inter picture prediction coding will be explained below.

The difference calculating unit 102 receives the reference blocks fromthe mode selecting unit 109. The difference calculating unit 102calculates the difference between the block of the picture B8 and thereference block (the motion compensation block), and generates theresidual error for output.

The residual error is inputted to the residual error coding unit 103.The residual error coding unit 103 performs coding processing such asfrequency conversion and quantization of the inputted residual error andthus generates the coded data of residual error for output. The codeddata outputted from the residual error coding unit 103 is inputted tothe bit stream generating unit 104.

The motion vectors used in the coding mode selected by the modeselecting unit 109 are outputted to the motion vector storage unit 116and the motion vector coding unit 117.

The motion vector storage unit 116 stores the motion vectors inputtedfrom the mode selecting unit 109. In other words, the motion vectorstorage unit 116 stores the motion vectors which have been used for thepreviously coded blocks.

The motion vector coding unit 117 codes the motion vectors inputted fromthe mode selecting unit 109. This operation will be explained withreference to FIGS. 3A˜3D. In these figures, blocks shown in boldface aremacroblocks of 16×16 pixels, and there exist four blocks of 8×8 pixelsin each macroblock. In FIGS. 3A˜3D, a block A is a current block whichis to be coded, and the motion vector for the block A is coded based onthe difference from the predicted vector obtained from the motionvectors of the three neighboring coded blocks B, C and D. The motionvectors for the neighboring blocks are obtained from the motion vectorstorage unit 116.

Methods of calculating a predicted vector will be explained withreference to FIGS. 4A˜4C. These figures illustrate the motion vectorsfor the blocks A˜D. MV1 and MV2 indicate the first motion vector and thesecond motion vector respectively. “Forward” means a forward referencemotion vector. Signs and numbers in parentheses show the referencepictures.

By the first method, the predicted vector is generated by selecting onlythe motion vectors which refer to the same reference picture as themotion vector of the current block, from the motion vectors for theneighboring blocks. In FIG. 4A, the predicted vector for MV1 for theblock A is the median of MV1 respective for the blocks B, C and D, andthe predicted vector for MV2 for the block A is the median of MV2respective for the blocks B, C and D. In FIG. 4B, the predicted vectorfor MV1 for the block A is the median of MV1 respective for the blocksB, C and D, and the predicted vector for MV2 for the block A is the MV2for the block C itself. In FIG. 4C, the predicted vector for MV1 for theblock A is the median of MV1 and MV2 for the block B, MV1 for the blockC and MV1 and MV2 for the block D, and the predicted vector for MV2 forthe block A is the MV2 for the block C itself. In this case, thepredicted vector for MV1 for the block A may be the median of threevectors: 1) the average of MV1 and MV2 for the block B; 2) MV1 for theblock C; or 3) the average of MV1 and MV2 for the block D. The averageof MV1 and MV2 for the block B is rounded to the precision of the motionvectors (e.g., 2/1 pixel precision, 1/4 pixel precision and 1/8 pixelprecision). This pixel precision is determined by every block, pictureor sequence. In such a case, if there is no motion vector for theneighboring blocks which refer to the same reference picture, thepredicted vector may be 0. The medians are calculated for horizontal andvertical components of the motion vector respectively.

By the second method, the predicted vectors are created separately forMV1 and MV2, regardless of the reference pictures. In this case, theorder of MV1 and MV2 in each block may be determined by a specifiedmethod. For example, MV1 and MV2 may be ordered in descending orascending order of temporal distances from the current picture to thereference pictures, forward vectors first or backward vectors first, incoding order (in the order in a bit stream), or the like. For example,the descending or ascending order of temporal distances from the currentpicture to the reference pictures increases the probability that thereference picture for the motion vector of the current block istemporally close to the reference picture for the motion vector selectedfor a predicted vector. Thus, motion vector coding efficiency can beimproved. Also, the order of forward vectors first and backward vectorssecond increases the probability that the forward motion vector of thecurrent block is coded using the predicted vector generated from theforward motion vectors of the neighboring blocks. Additionally, thebackward motion vector of the current block is coded using the predictedvector generated from the backward motion vectors of the neighboringblocks, and thus motion vector coding efficiency can be improved.Further, the coding order can simplify the method for managing theneighboring blocks for generating a predicted vector. In FIG. 4A, thepredicted vector for MV1 for the block A is the median of MV1 respectivefor the blocks B, C and D, and the predicted vector for MV2 for theblock A is the median of MV2 respective for the blocks B, C and D. Also,in FIGS. 4B and 4C, the predicted vector for MV1 for the block A is themedian of MV1 respective for the blocks B, C and D, and the predictedvector for MV2 for the block A is the median of MV2 respective for theblocks B, C and D. If the reference pictures of the motion vectors forthe block A are different from the reference pictures of the motionvectors for the blocks B, C and D which are used for the predictedvector for the block A, the motion vectors for the blocks B, C and D maybe scaled. They may be scaled based on a value determined by temporaldistance between pictures or a predetermined value.

By the third method, the predicted vector for MV1 is generated based onthe neighboring blocks for use. If MV1 is used as a predicted vector forMV2, the MV1 itself may be used as the predicted vector, or the scaledMV1 may be used. If the scaled one is used, it is conceivable to makethe temporal distance between the picture B8 and the reference pictureof MV1 equal to the temporal distance between the picture B8 and thereference picture of MV2. An example of how to make them equal will beexplained with reference to FIG. 6. In FIG. 6, it is assumed that theblock A in the picture B8 has the motion vectors MV1 and MV2 and thereference pictures of MV1 and MV2 are the pictures P7 and P4respectively. In this case, MV1′ obtained by scaling MV1 to the pictureP4 (that is a vector obtained by quadrupling horizontal and verticalcomponents of MV1 respectively in this example) is used as a predictedvector for the motion vector MV2. Or, it may be scaled using apredetermined value for another method. In addition, the order of MV1and MV2 for each block may be predetermined by a specified method. Forexample, MV1 and MV2 may be ordered in descending or ascending order oftemporal distances from the current picture to the reference pictures,forward vectors first or backward vectors first, in coding order, or thelike.

In the above examples, all of the blocks B˜D have motion vectors, but ifthese blocks are coded as intra blocks or in direct mode, exceptionalprocessing may be performed for them. For example, if one of the blocksB˜D is a block of such a type, the motion vectors for that block areconsidered to be 0 for coding. If two of them are blocks of such a type,the motion vectors of the remaining block are used as predicted vectors.And if all of the blocks have no motion vector, motion vectors are codedon the assumption that the predicted vector is 0. This type ofprocessing may also be applied.

Upon receipt of the coded data, the bit stream generating unit 104performs variable length coding of the coded data, and further adds theinformation, (e.g. as the coded motion vectors inputted from the motionvector coding unit 117, the coding mode inputted from the mode selectingunit 109, and the header information, to the coded data, so as togenerate a bit stream for output).

According to the same processing, the remaining macroblocks in thepicture B8 are coded.

As described above, according to the motion vector coding method of thepresent invention, a motion vector for each current block is coded usinga difference between the predicted vector which is obtained from motionvectors for previously coded neighboring blocks and the motion vectorfor the current block. This predicted vector is generated by one of thefollowing processes. When the current block and the neighboring blocksrespectively have a plurality of motion vectors pointing the referencepictures in the same direction (forward or backward): (A) the motionvectors which refer to the same picture are selected from among themotion vectors for the neighboring blocks so as to generate thepredicted vector (based on the selected motion vectors); (B) the motionvectors for the respective neighboring blocks are ordered in thepredetermined order, and the motion vectors of the same order rank areselected from the ordered motion vectors so as to generate the predictedvector (based on the selected motion vectors); and (C) the predictedvector for “the second motion vector” of the current block shall be “thefirst motion vector”, and if “the second motion vector” and “the firstmotion vector” refer to different pictures, “the first motion vector” isscaled according to the temporal distance between the pictures so as togenerate the predicted vector.

More specifically, the motion vector coding method according to thepresent invention is a motion vector coding method for generating amotion vector for a current block to be coded and a predicted vector forthe motion vector, and then coding a difference between the motionvector and the predicted vector. The motion vector coding methodincludes: an assigning step that, when at least one block among aplurality of coded blocks in the neighborhood of the current block hastwo motion vectors which refer to reference pictures in the samedirection in a display order, assigns IDs to two motion vectors forrespective one of the plurality of coded blocks; and a generating stepthat generates the predicted vector for each of the motion vectors forthe current block based on the motion vectors with the same ID among themotion vectors for the plurality of coded blocks. Here, in theabove-mentioned assigning step and the generating step, the following(a) and (b) can be executed:

(a) in the assigning step, the IDs are further assigned to the motionvectors for the current block, and in the generating step, the predictedvector for each of the motion vectors for the current block is generatedbased on the motion vectors with the same ID as the ID assigned to themotion vector for the current block among the motion vectors for theplurality of coded blocks; and (b) in the assigning step, the IDs arefurther assigned to the motion vectors for the current block. Thegenerating step includes a generating sub-step for generating acandidate predicted vector by each ID based on the motion vectors withthe same ID among the motion vectors for the plurality of coded blocks;and an associating sub-step for associating the candidate predictedvector with said each ID for the motion vector for the current block.

Accordingly, even when a neighboring block has a plurality of motionvectors pointing in the same direction (forward or backward), the methodfor coding the motion vectors can be unified, and the coding efficiencyof the motion vectors can be improved.

In the present embodiment, a macroblock is horizontal 16×vertical 16pixels, motion compensation is performed by every block of 8×8 pixels,and the residual error is coded by every horizontal 8×vertical 8 pixels,but any other number of pixels may also be applied.

Further, in the present embodiment, a motion vector of a current blockis coded using the median of the motion vectors of the three previouslycoded neighboring blocks as a predicted vector, but the number of theneighboring blocks may be any other numbers, and the predicted vectormay be determined by any other methods. For example, the motion vectorsfor the block immediately left of the current block may be used for apredicted vector.

In the present embodiment, the location of the previously codedneighboring block for motion vector coding has been explained withreference to FIG. 3, but any other locations may be applied.

For example, if the blocks of 8×8 pixels of the present embodiment andblocks of any other sizes are mixed, the following coded neighboringblocks B, C and D may be used for the current block A. Specifically, itmay be determined that the block B is a block containing a pixel to theleft of the upper left pixel in the block A, the block C is a blockcontaining a pixel just above the upper left pixel in the block A, andthe block D is a block containing a pixel above and to the right of theupper right pixel in the block A.

In an embodiment of the present embodiment, a motion vector is coded bycalculating the difference between the motion vector of a current blockand the predicted vector obtained from the motion vectors for theneighboring blocks. However, it may be coded by other methods than thedifference calculation.

In addition, in the present embodiment, the first, second and thirdmethods of generating the predicted vector for motion vector coding havebeen respectively explained, but these methods may be used incombination.

An example of the combined method will be explained with reference toFIG. 7. FIG. 7 is a flowchart illustrating the case where the first andsecond predicted vector generating methods are combined, and morespecifically, the processing of generating a predicted vector in thecase where a block A in FIGS. 3A˜3D is a current block and two motionvectors of each neighboring block B—D point the reference blocks in thesame direction (forward or backward). In this figure, Steps S115˜S118correspond to the above-mentioned first predicted vector generatingmethod. And Steps S111˜S114 correspond to a part of determining theorder of the neighboring blocks for the second method.

A predetermined order in S112 may be the descending or ascending orderof temporal distances from the current picture to the referencepictures, coding order, or the like. Here, the coding order is the orderin a bit stream, as illustrated in FIG. 8. FIG. 8 illustrates picturedata corresponding to one picture in a bit stream. The picture dataincludes a header and coded data of respective blocks. The motionvectors are placed in the coded data of the blocks. In this figure, themotion vectors for the blocks B and C are placed in coding order.

In S113, the motion vectors in the predetermined order are classifiedinto MV1 and MV2 according to their order ranks. This classification ofthe motion vectors for the neighboring blocks allows more simplifiedprocessing. If the motion vectors are not classified, the median of amaximum of 6 motion vectors (2 motion vectors×3 neighboring blocks)needs to be calculated.

More specifically, in the processing of Loop 1, two motion vectors forthe neighboring block B are first ordered in the above predeterminedorder (S112), and IDs (for instance, 0 and 1, 1 and 2, MV1 and MV2, orthe like) are assigned to them in this order (S113). The IDs (forinstance, 0 and 1, 1 and 2, MV1 and MV2, or the like) are also assignedto the motion vectors respectively for the neighboring blocks C and D inthe same manner. At this time, the IDs are also assigned to the twomotion vectors for the current block A in the same manner.

Next, in the processing of Loop 2, the motion vectors with the same ID(for instance, 0 or 1) are first selected from among the motion vectorsfor the neighboring blocks B˜D (S116), and the median of the selectedmotion vectors are considered as a predicted vector for the currentblock A (S117). The predicted vector for another motion vector is alsoobtained in the same manner.

Note that in Loop 2, the above-mentioned two medians may be calculatedas candidate predicted vectors, regardless of the IDs of the motionvectors for the block A, so as to select any one of the candidatevectors for (or associate it with) each ID of the motion vector for theblock A. Also, in Loop 1, the IDs does not need to be assigned whengenerating the predicted vectors for the block A, but may be assignedwhen detecting the motion vectors for the neighboring blocks B, C and D.The assigned IDs as well as the motion vectors are stored in the motionvector storage unit 116.

For using the second and third predicted vector generating methodstogether, the third predicted vector generating method can be executedinstead of S115˜S118 in FIG. 7.

In the present embodiment, a predicted vector is generated for coding amotion vector on the assumption that a current block has forwardreference motion vectors only, but the predicted vector can be generatedin the same manner even if the current block has a backward referencemotion vector.

Further, in the present embodiment, a predicted vector is generated forcoding a motion vector on the assumption that all neighboring blockshave two motion vectors respectively. However, even if a neighboringblock has only one motion vector, the motion vector can be dealt with asa first or a second motion vector.

In addition, in the present embodiment, the case where the maximumnumber of reference pictures is 2 has been explained, but it may be 3 ormore.

In addition, there are the following methods for storing and managingmotion vectors in the motion vector storage unit 116 of the presentembodiment: (1) motion vectors for neighboring blocks and the orderthereof (IDs indicating whether they are the first motion vectors or thesecond motion vectors) are stored so as to acquire the first or thesecond motion vector for each neighboring block from the motion vectorstorage unit 116 using the IDs; and (2) the locations for storing thefirst motion vector and the second motion vector for each neighboringblock are predetermined so as to acquire the first or the second motionvector for the neighboring block from the motion vector storage unit 116by accessing the storage locations thereof.

The second embodiment of the present invention will be explained belowwith reference to FIG. 9. FIG. 9 is a block diagram of the picturedecoding apparatus for decoding motion vectors as a part of picturedecoding, including a bit stream analyzing unit 701, a residual errordecoding unit 702, a mode decoding unit 703, a motion compensationdecoding unit 705, a motion vector storage unit 706, a frame memory 707,an addition unit 708, switches 709 and 710, and a motion vector decodingunit 711.

The input order of pictures in the bit stream is the same as thatillustrated in FIG. 2B. Decoding processing of the picture B8 will beexplained below.

The bit stream of the picture B8 is inputted to the bit stream analyzingunit 701. The bit stream analyzing unit 701 extracts various types ofdata from the inputted bit stream. Here, various types of data includemode selection information and motion vector information. The extractedmode selection information is outputted to the mode decoding unit 703.The extracted motion vector information is outputted to the motionvector decoding unit 711. The coded data of residual error is outputtedto the residual error decoding unit 702.

The mode decoding unit 703 controls the switch 709 and the switch 710based on the mode selection information extracted from the bit stream.If the mode selection is intra picture coding, it controls the switch709 and the switch 710 to be connected to “a” and “c” respectively. Ifthe mode selection is inter picture prediction coding, it controls theswitch 709 and the switch 710 to be connected to “b” and “d”respectively.

The mode decoding unit 703 also outputs the mode selection informationto the motion compensation decoding unit 705 and the motion vectordecoding unit 711. The case where the mode selection is inter pictureprediction coding will be explained below.

The residual error decoding unit 702 decodes the inputted coded data ofresidual error to generate residual errors. The generated residualerrors are outputted to the switch 709. Since the switch 709 isconnected to “b” here, the residual errors are outputted to the additionunit 708.

The motion vector decoding unit 711 performs decoding processing of thecoded motion vectors which are inputted from the bit stream analyzingunit 701. The coded motion vectors are decoded using the motion vectorsof the previously decoded neighboring blocks. This operation will beexplained with reference to FIGS. 3A˜3D. The coded motion vector (MV)for the current block A which is to be decoded is calculated by addingthe predicted vector obtained from the motion vectors of the threepreviously decoded neighboring blocks B, C and D and the coded motionvector. The motion vectors of the neighboring blocks are obtained fromthe motion vector storage unit 706.

Methods of calculating a predicted vector will be explained withreference to FIGS. 4A˜4C. These figures show the motion vectors for theblocks A˜D. MV1 and MV2 indicate the first motion vectors and the secondmotion vectors respectively. “Forward” means a forward reference motionvector. Signs and numbers in parentheses show the reference pictures.

By the first method, the predicted vector is generated by selecting onlythe motion vectors which refer to the same reference picture as themotion vector for the current block, from the motion vectors for theneighboring blocks. In FIG. 4A, the predicted vector for MV1 for theblock A is the median of MV1 respective for the blocks B, C and D, andthe predicted vector for MV2 for the block A is the median of MV2respective for the blocks B, C and D. In FIG. 4B, the predicted vectorfor MV1 for the block A is the median of MV1 respective for the blocksB, C and D, and the predicted vector for MV2 for the block A is the MV2for the block C itself. In FIG. 4C, the predicted vector for MV1 for theblock A is the median of MV1 and MV2 for the block B, MV1 for the blockC and MV1 and MV2 for the block D, and the predicted vector for MV2 forthe block A is the MV2 for the block C itself. In this case, thepredicted vector for MV1 for the block A may be the median of threevectors: 1) the average of MV1 and MV2 for the block B; 2) MV1 for theblock C; or 3) the average of MV1 and MV2 for the block D. The averageof MV1 and MV2 for the block B is rounded to the precision of the motionvectors (such as 2/1 pixel precision, 1/4 pixel precision and 1/8 pixelprecision). This pixel precision is determined by every block, pictureor sequence. In such a case, if there is no motion vector for theneighboring blocks which refer to the same reference picture, thepredicted vector may be 0. The medians are calculated for horizontal andvertical components of the motion vector respectively.

By the second method, the predicted vectors are created separately forMV1 and MV2, regardless of the reference pictures. In this case, theorder of MV1 and MV2 in each block may be determined by a specifiedmethod. For example, MV1 and MV2 may be ordered in descending orascending order of temporal distances from the current picture to thereference pictures, forward vectors first or backward vectors first, indecoding order (in the order in a bit stream), or the like. In FIG. 4A,the predicted vector for MV1 for the block A is the median of MV1respective for the blocks B, C and D, and the predicted vector for MV2for the block A is the median of MV2 respective for the blocks B, C andD. Also, in FIGS. 4B and 4C, the predicted vector for MV1 for the blockA is the median of MV1 respective for the blocks B, C and D, and thepredicted vector for MV2 for the block A is the median of MV2 respectivefor the blocks B, C and D. If the reference pictures of the motionvectors for the block A are different from the reference pictures of themotion vectors for the blocks B, C and D which are used for thepredicted vector for the block A, the motion vectors for the blocks B, Cand D may be scaled. They may be scaled based on a value determined bytemporal distance between pictures or a predetermined value.

By the third method, the predicted vector for MV1 is generated based onthe neighboring blocks for use. If MV1 is used as a predicted vector forMV2, the MV1 itself may be used as the predicted vector, or the scaledMV1 may be used. If the scaled one is used, it is conceivable to makethe temporal distance between the picture B8 and the reference pictureof MV1 equal to the temporal distance between the picture B8 and thereference picture of MV2. An example of how to make them equal will beexplained with reference to FIG. 6. In FIG. 6, it is assumed that theblock A in the picture B8 has the motion vectors MV1 and MV2 and thereference pictures of MV1 and MV2 are the pictures P7 and P4respectively. In this case, MV1′ obtained by scaling MV1 to the pictureP4 (that is a vector obtained by quadrupling horizontal and verticalcomponents of MV1 respectively in this example) is used as a predictedvector for the motion vector MV2. Or, it may be scaled using apredetermined value for another method. In addition, the order of MV1and MV2 for each block may be predetermined by a specified method. Forexample, MV1 and MV2 may be ordered in descending or ascending order oftemporal distances from the current picture to the reference pictures,forward vectors first or backward vectors first, in decoding order, orthe like.

In the above example, all of the blocks B˜D have motion vectors, but ifthese blocks are coded as intra blocks or in direct mode, exceptionalprocessing may be performed for them. For example, if one of the blocksB˜D is a block of such a type, the motion vectors for that block areconsidered to be 0 for decoding. If two of them are blocks of such atype, the motion vectors of the remaining block are used as predictedvectors. And if all of the blocks have no motion vector, motion vectorsare decoded on the assumption that the predicted vector is 0. This typeof processing may also be applied.

The decoded motion vectors are outputted to the motion compensationdecoding unit 705 and the motion vector storage unit 706. The motioncompensation decoding unit 705 acquires the motion compensation blocksfrom the frame memory 707 based on the inputted motion vectors. Themotion compensation blocks generated as mentioned above are outputted tothe addition unit 708. The motion vector storage unit 706 stores theinputted motion vectors. Specifically, the motion vector storage unit706 stores the motion vectors for the decoded blocks.

The addition unit 708 adds the inputted residual errors and the motioncompensation blocks to generate decoded blocks. The generated decodedblocks are outputted to the frame memory 707 via the switch 710. Themacroblocks in the picture B8 are decoded in sequence in the manner asmentioned above.

As described above, according to the motion vector decoding method ofthe present invention, a motion vectors for each current block isdecoded by adding a predicted vector which is obtained from motionvectors for previously decoded neighboring blocks and the coded motionvector for the current block. This predicted vector is generated by oneof the following processes. When the current block and the neighboringblocks respectively have a plurality of motion vectors pointing thereference pictures in the same direction (forward or backward): (A) themotion vectors which refer to the same picture are selected from amongthe motion vectors for the neighboring blocks so as to generate thepredicted vector (based on the selected motion vectors); (B) the motionvectors for the respective neighboring blocks are ordered in thepredetermined order, and the motion vectors of the same order rank areselected from the ordered motion vectors so as to generate the predictedvector (based on the selected motion vectors); and (C) the predictedvector for “the second motion vector” of the current block shall be “thefirst motion vector”, and if “the second motion vector” and “the firstmotion vector” refer to different pictures, “the first motion vector” isscaled according to the temporal distance between the pictures so as togenerate the predicted vector.

More specifically, the motion vector decoding method according to thepresent invention is a motion vector decoding method for generating apredicted vector for a current block to be decoded and decoding a codedmotion vector using the predicted vector, the motion vector decodingmethod comprising an assigning step that, when at least one block amonga plurality of decoded blocks in the neighborhood of the current blockhas motion vectors which refer to reference pictures in the samedirection in a display order, assigns IDs to motion vectors forrespective one of the plurality of decoded blocks; and a generating stepgenerates the predicted vector for each of the motion vectors for thecurrent block based on the motion vectors with the same ID among themotion vectors for the plurality of decoded blocks. Here, in theabove-mentioned the generating step, the following (a) and (b) can beexecuted:

(a) in the generating step, the predicted vector is generated based onthe motion vectors for the plurality of decoded blocks with the same IDas the ID assigned to the motion vector for the current block.

(b) in the generating step, the predicted vector is generated byassociating a candidate predicted vector generated by each ID for themotion vectors with the same ID among the motion vectors for theplurality of decoded blocks with the ID for the motion vector for thecurrent block. The motion vectors for the decoded block aredistinguished based on one of descending and ascending orders oftemporal distances in the display order from a picture including thecurrent block to the reference pictures referred to by the motionvectors.

Accordingly, the motion vectors which are coded in the method as shownin the first embodiment can be correctly decoded.

In the present embodiment, a motion vector of a current block is decodedusing the median of the motion vectors of the three previously decodedneighboring blocks as a predicted vector, but the number of theneighboring blocks may be any other numbers, and the predicted vectormay be determined by any other methods. For example, the motion vectorsfor the block immediately left of the current block may be used for apredicted vector.

For example, if the blocks of 8×8 pixels of the present embodiment andblocks of any other sizes are mixed, the following decoded neighboringblocks B, C and D may be used for the current block A. Specifically, itmay be determined that the block B is a block containing a pixel to theleft of the upper left pixel in the block A, the block C is a blockcontaining a pixel just above the upper left pixel in the block A andthe block D is a block containing a pixel above and to the right of theupper right pixel in the block A.

In the present embodiment, the locations of the previously decodedneighboring blocks for motion vector decoding have been explained withreference to FIGS. 3A˜3D, but any other locations may be applied.

In the present embodiment, motion vector is decoded by adding the motionvector of a current block and the predicted vector obtained from themotion vectors for the neighboring blocks, but it may be decoded byother methods than the addition.

In addition, in the present embodiment, the first, second and thirdmethods of generating the predicted vector for motion vector decodinghave been respectively explained, but these methods may be used incombination.

For example, if the first and second predicted vector generating methodsare combined, the predicted vector can be generated according to theflow as illustrated in FIG. 7. If the second and third predicted vectorgenerating methods are combined, the third method can be executedinstead of S115˜S118 in FIG. 7.

In the present embodiment, a predicted vector is generated for decodingmotion vectors on the assumption that a current block has forwardreference motion vectors only, but the predicted vector can be generatedin the same manner even if the current block has a backward referencemotion vector.

In the present embodiment, the case where the maximum number ofreference pictures is 2 has been explained, but it may be 3 or more.

Further, there are the following methods for storing and managing motionvectors in the motion vector storage unit 706 of the present embodiment:(1) motion vectors for neighboring blocks and the order thereof (IDsindicating whether they are the first motion vectors or the secondmotion vectors) are stored so as to acquire the first or the secondmotion vector for each neighboring block from the motion vector storageunit 706 using the IDs; and (2) the locations for storing the firstmotion vector and the second motion vector for each neighboring blockare predetermined so as to acquire the first or the second motion vectorfor the neighboring block from the motion vector storage unit 706 byaccessing the storage locations thereof.

In addition, if a program for realizing the structure of the motionvector coding method, the picture coding method including the motionvector coding method, the motion vector decoding method, or the picturedecoding method including the motion vector decoding method, as shown inthe first and second embodiments, is recorded on a storage medium suchas a flexible disk, it becomes possible to perform the processing asshown in these embodiments easily in an independent computer system.

FIGS. 10A, 10B and 10C are illustrate the case where the processing isperformed in a computer system using a flexible disk which stores theabove-mentioned program.

FIG. 10B illustrates a flexible disk and the front view and thecross-sectional view of the appearance of the flexible disk, and FIG.10A illustrates an example of a physical format of a flexible disk as astorage medium itself. A flexible disk FD is contained in a case F, aplurality of tracks Tr are formed concentrically on the surface of thedisk in the radius direction from the periphery, and each track isdivided into 16 sectors Se in the angular direction. Therefore, as forthe flexible disk storing the above-mentioned program, the picturecoding method as the program is recorded in an area allocated for it onthe flexible disk FD.

FIG. 10C illustrates the structure for writing and reading the programon and from the flexible disk FD. When the program is recorded on theflexible disk FD, the computer system Cs writes the picture codingmethod or the picture decoding method as the program on the flexibledisk FD via a flexible disk drive. For constructing the picture codingmethod in the computer system by the program recorded on the flexibledisk, the program is read out from the flexible disk via the flexibledisk drive and transferred to the computer system.

The above explanation is made on the assumption that a storage medium isa flexible disk, but the same processing can also be performed using anoptical disk. In addition, the storage medium is not limited to aflexible disk and an optical disk, but any other mediums such as an ICcard and a ROM cassette can be used if a program can be recorded onthem.

FIG. 11˜FIG. 14 are illustrate exemplary apparatuses for performing thecoding or decoding processing of the first and second embodiments and,and an exemplary system using them.

FIG. 11 is a block diagram illustrating the overall configuration of acontent providing system ex100 for realizing content distributionservice. The area for providing communication service is divided intocells of desired size, and mobile stations ex107˜ex110 which are fixedwireless stations are placed in respective cells.

This content providing system ex100 is connected to apparatuses such asa computer ex111, a PDA (Personal Digital Assistant) ex112, a cameraex113, a mobile phone ex114 and a camera-equipped mobile phone ex115 viathe Internet ex101, an Internet service provider ex102, a telephonenetwork ex104 and mobile stations ex107˜ex110.

However, the content providing system ex100 is not limited to theconfiguration as shown in FIG. 11, and may be connected to a combinationof any of them. Also, each apparatus may be connected directly to thetelephone network ex104, not through the mobile stations ex107˜ex110.

The camera ex113 is an apparatus such as a digital video camera capableof shooting moving pictures. The mobile phone may be a mobile phone of aPDC (Personal Digital Communication) system, a CDMA (Code DivisionMultiple Access) system, a W-CDMA (Wideband-Code Division MultipleAccess) system or a GSM (Global System for Mobile Communications)system, a PHS (Personal Handyphone System) or the like.

A streaming server ex103 is connected to the camera ex113 via thetelephone network ex104 and the mobile station ex109, which enables livedistribution or the like using the camera ex113 based on the coded datatransmitted from the user. Either the camera ex113 or the server fortransmitting the data may code the data shot by the camera. Also, themoving picture data shot by a camera ex116 may be transmitted to thestreaming server ex103 via the computer ex111. The camera ex116 is anapparatus such as a digital camera capable of shooting still and movingpictures. Either the camera ex116 or the computer ex111 may code themoving picture data. An LSI ex117 included in the computer ex111 or thecamera ex116 actually performs coding processing. Software for codingand decoding pictures may be integrated into any type of a storagemedium (such as a CD-ROM, a flexible disk and a hard disk) which isreadable by the computer ex111 or the like. Furthermore, thecamera-equipped mobile phone ex115 may transmit the moving picture data.This moving picture data is the data coded by the LSI included in themobile phone ex115.

In the content providing system ex100, contents (such as a music livevideo) shot by users using the camera ex113, the camera ex116 or thelike are coded in the same manner as the first embodiment andtransmitted to the streaming server ex103, while the streaming serverex103 makes stream distribution of the content data to the clients attheir request. The clients include the computer ex111, the PDA ex112,the camera ex113, the mobile phone ex114 and so on capable of decodingthe above-mentioned coded data. In the content providing system ex100,the clients can thus receive and reproduce the coded data, and furthercan receive, decode and reproduce the data in real-time so as to realizepersonal broadcasting.

When each apparatus in this system performs coding or decoding, themoving picture coding apparatus or the moving picture decodingapparatus, as shown in the above-mentioned first or second embodiment,can be used.

A mobile phone will be explained as an example.

FIG. 12 is a diagram illustrating the mobile phone ex115 realized usingthe moving picture coding method and the moving picture decoding methodexplained in the first and second embodiments. The mobile phone ex115has an antenna ex201 for sending and receiving radio waves between themobile station ex110, a camera unit ex203 such as a CCD camera capableof shooting moving and still pictures, a display unit ex202 such as aliquid crystal display for displaying the data obtained by decodingpictures and the like shot by the camera unit ex203 or received by theantenna ex201. A main body includes a set of operation keys ex204, avoice output unit ex208 such as a speaker for outputting voices, a voiceinput unit 205 such as a microphone for inputting voices, a storagemedium ex207 for storing coded or decoded data such as data of moving orstill pictures shot by the camera and data of moving or still picturesof received e-mails, and a slot unit ex206 for attaching the storagemedium ex207 into the mobile phone ex115. The storage medium ex207includes a flash memory element, a kind of EEPROM (Electrically Erasableand Programmable Read Only Memory) that is an electrically erasable andrewritable nonvolatile memory, in a plastic case such as an SD card.

Next, the mobile phone ex115 will be explained with reference to FIG.13. In the mobile phone ex115, a main control unit ex311 for overallcontrolling each unit of the main body including the display unit ex202and the operation keys ex204 is connected to a power supply circuit unitex310, an operation input control unit ex304, a picture coding unitex312, a camera interface unit ex303, an LCD (Liquid Crystal Display)control unit ex302, a picture decoding unit ex309, amultiplex/demultiplex unit ex308, a read/write unit ex307, a modemcircuit unit ex306 and a voice processing unit ex305 to each other via asynchronous bus ex313.

When a call-end key or a power key is turned ON by a user's operation,the power supply circuit unit ex310 supplies respective units with powerfrom a battery pack so as to activate the camera-equipped digital mobilephone ex115 for a ready state.

In the mobile phone ex115, the voice processing unit ex305 converts thevoice signals received by the voice input unit ex205 in conversationmode into digital voice data under the control of the main control unitex311 including a CPU, ROM and RAM, the modem circuit unit ex306performs spread spectrum processing of the digital voice data, and thesend/receive circuit unit ex301 performs digital-to-analog conversionand frequency conversion of the data, so as to transmit it via theantenna ex201. Also, in the mobile phone ex115, the send/receive circuitunit ex301 amplifies the data received by the antenna ex201 inconversation mode and performs frequency conversion andanalog-to-digital conversion of the data, the modem circuit unit ex306performs inverse spread spectrum processing of the data, and the voiceprocessing unit ex305 converts it into analog voice data, so as tooutput it via the voice output unit ex208.

Furthermore, when transmitting an e-mail in data communication mode, thetext data of the e-mail inputted by operating the operation keys ex204on the main body is sent out to the main control unit ex311 via theoperation input control unit ex304. In the main control unit ex311,after the modem circuit unit ex306 performs spread spectrum processingof the text data and the send/receive circuit unit ex301 performsdigital-to-analog conversion and frequency conversion of it, the data istransmitted to the mobile station ex110 via the antenna ex201.

When picture data is transmitted in data communication mode, the picturedata shot by the camera unit ex203 is supplied to the picture codingunit ex312 via the camera interface unit ex303. When it is nottransmitted, the picture data shot by the camera unit ex203 can also bedisplayed directly on the display unit 202 via the camera interface unitex303 and the LCD control unit ex302.

The picture coding unit ex312, which includes the picture codingapparatus as explained in the present invention, codes the picture datasupplied from the camera unit ex203 by the coding method used for thepicture coding apparatus as shown in the above-mentioned firstembodiment so as to transform it into coded picture data, and sends itout to the multiplex/demultiplex unit ex308. At this time, the mobilephone ex115 sends out the voices received by the voice input unit ex205during shooting pictures by the camera unit ex203 to themultiplex/demultiplex unit ex308 as digital voice data via the voiceprocessing unit ex305.

The multiplex/demultiplex unit ex308 multiplexes the coded picture datasupplied from the picture coding unit ex312 and the voice data suppliedfrom the voice processing unit ex305 by a predetermined method, themodem circuit unit ex306 performs spread spectrum processing of theresulting multiplexed data, and the send/receive circuit unit ex301performs digital-to-analog conversion and frequency conversion of thedata for transmitting via the antenna ex201.

As for receiving data of a moving picture file which is linked to a Webpage or the like in data communication mode, the modem circuit unitex306 performs inverse spread spectrum processing of the data receivedfrom the mobile station ex110 via the antenna ex201, and sends out theresulting multiplexed data to the multiplex/demultiplex unit ex308.

In order to decode the multiplexed data received via the antenna ex201,the multiplex/demultiplex unit ex308 demultiplexes the multiplexed datainto a bit stream of picture data and a bit stream of voice data, andsupplies the coded picture data to the picture decoding unit ex309 andthe voice data to the voice processing unit ex305 respectively via thesynchronous bus ex313.

Next, the picture decoding unit ex309, which includes the picturedecoding apparatus as explained in the present invention, decodes thebit stream of picture data by the decoding method paired with the codingmethod as shown in the above-mentioned embodiments, so as to generatereproduced moving picture data, and supplies this data to the displayunit ex202 via the LCD control unit ex302, and thus picture dataincluded in a moving picture file linked to a Web page, for instance, isdisplayed. At the same time, the voice processing unit ex305 convertsthe voice data into analog voice data, and supplies this data to thevoice output unit ex208, and thus voice data included in a movingpicture file linked to a Web page, for instance, is reproduced.

The present invention is not limited to the above-mentioned system, andat least either the picture coding apparatus or the picture decodingapparatus in the above-mentioned embodiments can be incorporated into adigital broadcasting system as shown in FIG. 14. Such ground-based orsatellite digital broadcasting has been in the news lately. Morespecifically, a bit stream of picture information is transmitted from abroadcast station ex409 to or communicated with a broadcast satelliteex410 via radio waves. Upon receipt of it, the broadcast satellite ex410transmits radio waves for broadcasting, a home antenna ex406 with asatellite broadcast reception function receives the radio waves, and anapparatus such as a television (receiver) ex401 or a set top box (STB)ex407 decodes the bit stream for reproduction. The picture decodingapparatus as shown in the above-mentioned embodiment can be implementedin the reproducing apparatus ex403 for reading the bit stream recordedon a storage medium ex402 such as a CD and DVD and decoding it. In thiscase, the reproduced picture signals are displayed on a monitor ex404.It is also conceived to implement the picture decoding apparatus in theset top box ex407 connected to a cable ex405 for a cable television orthe antenna ex406 for satellite and/or ground-based broadcasting so asto reproduce the picture signals on a monitor ex408 of the televisionex401. The picture decoding apparatus may be incorporated into thetelevision, not in the set top box. Or, a car ex412 having an antennaex411 can receive signals from the satellite ex410 or the mobile stationex107 for reproducing moving pictures on a display apparatus such as acar navigation apparatus ex413 in the car ex412.

Furthermore, the picture coding apparatus as shown in theabove-mentioned embodiment can code picture signals for recording on astorage medium. As a concrete example, there is a recorder ex420 such asa DVD recorder for recording picture signals on a DVD disk ex421 and adisk recorder for recording them on a hard disk. They can also berecorded on an SD card (memory card) ex422. If the recorder ex420includes the picture decoding apparatus as shown in the above-mentionedembodiment, the picture signals recorded on the DVD disk ex421 or the SDcard ex422 can be reproduced for display on the monitor ex408.

As the structure of the car navigation apparatus ex413, the structurewithout the camera unit ex203, the camera interface unit ex303 and thepicture coding unit ex312, out of the units as shown in FIG. 13, isconceivable. The same applies to the computer ex111, the television(receiver) ex401 and others.

In addition, three types of implementations can be conceived for aterminal such as the above-mentioned mobile phone ex114; asending/receiving terminal equipped with both an encoder and a decoder,a sending terminal equipped with an encoder only, and a receivingterminal equipped with a decoder only.

As described above, it is possible to apply the moving picture codingmethod or the moving picture decoding method in the above-mentionedembodiments to any of the above apparatuses and systems, and by applyingthis method, the effects described in the above embodiments can beobtained.

From the invention thus described, it will be obvious that theembodiments of the invention may be varied in many ways. Such variationsare not to be regarded as a departure from the spirit and scope of theinvention, and all such modifications as would be obvious to one skilledin the art are intended for inclusion within the scope of the followingclaims.

The present invention can be applied to a motion vector coding apparatusand a moving picture coding apparatus for generating a motion vector fora current block to be coded and a predicted vector for the motionvector, coding the difference between the motion vector and thepredicted vector, and placing the coded difference in a bit streamrepresenting a moving picture.

The present invention can also be applied to a motion vector decodingapparatus and a moving picture decoding apparatus for decoding the bitstream.

The invention claimed is:
 1. A motion vector coding method for derivinga predicted motion vector for a current block to be coded and coding amotion vector of the current block using the predicted motion vector,the motion vector coding method comprising: determining a motion vectorof the current block which is used when performing a motion compensationon the current block; specifying a plurality of neighboring blocks whichare located around the current block; deriving a predicted motion vectorfor the determined motion vector of the current block based on motionvectors of the plurality of neighboring blocks; and coding a differencebetween the determined motion vector of the current block and thepredicted motion vector, wherein the deriving of the predicted motionvector includes: selecting a motion vector which refers to the samereference picture as referred to by the motion vector of the currentblock, from among motion vectors of the plurality of neighboring blockshaving the same identifier as the identifier assigned to the motionvector of the current block when at least one block among the pluralityof neighboring blocks has two motion vectors which refer to referencepictures in the same direction in a display order, and when the selectedmotion vector of the plurality of neighboring blocks is only one,deriving the one selected motion vector as the predicted motion vectorof the current block.
 2. The motion vector coding method according toclaim 1, wherein the identifier is assigned to the motion vectors of theplurality of neighboring blocks on a block-by-block basis according toan order in which the motion vectors of a respective block are output ascoded motion vectors into a bit stream.
 3. A motion vector codingapparatus that derives a predicted motion vector for a current block tobe coded and codes a motion vector of the current block using thepredicted motion vector, the motion vector coding apparatus comprising:a determining unit operable to determine a motion vector of the currentblock which is used when performing a motion compensation on the currentblock; a specifying unit operable to specify a plurality of neighboringblocks which are located around the current block; a deriving unitoperable to derive a predicted motion vector for the determined motionvector of the current block based on motion vectors of the plurality ofneighboring blocks; and a coding unit operable to code a differencebetween the determined motion vector of the current block and thepredicted motion vector, wherein the deriving unit is operable to:select a motion vector which refers to the same reference picture asreferred to by the motion vector of the current block, from among motionvectors of the plurality of neighboring blocks having the sameidentifier as the identifier assigned to the motion vector of thecurrent block when at least one block among the plurality of neighboringblocks has two motion vectors which refer to reference pictures in thesame direction in a display order, and when the selected motion vectorof the plurality of neighboring blocks is only one, derive the oneselected motion vector as the predicted motion vector of the currentblock.
 4. The motion vector coding apparatus according to claim 3,wherein the identifier is assigned to the motion vectors of theplurality of neighboring blocks on a block-by-block basis according toan order in which the motion vectors of a respective block are output ascoded motion vectors into a bit stream.